package pers.vic.practice.module.system.service;

import org.springframework.stereotype.Service;
import pers.vic.boot.base.service.BaseService;
import pers.vic.practice.module.system.mapper.SysDictMapper;  
import pers.vic.practice.module.system.model.SysDict;

import java.util.List;

/**
 * @description:字典表 Service
 * @author Vic.xu
 * @date: 2022-04-12 09:48
 */
@Service
public class SysDictService extends BaseService<SysDictMapper, SysDict>{

    @Override
    protected boolean hasAttachment() {
        return false;
    }

    public List<SysDict> findByTypeCode(String code) {
        return mapper.findByTypeCode(code);
    }

    public String findByTypeAndCode(String typeCode, String value) {
        return mapper.findByTypeAndCode(typeCode, value);
    }

    public List<SysDict> findByPid(String pid) {
        return mapper.findByPid(pid);
    }

    public List<SysDict> findByParentValueAndCode(String parentValue, String parentTypeCode) {
        return mapper.findByParentValueAndCode(parentValue, parentTypeCode);
    }
}
